import request from '@/utils/request'

export function save(data) {
  return request({
    url: '/customer/save',
    method: 'post',
    data
  })
}
export function update(data) {
  return request({
    url: '/customer/update',
    method: 'post',
    data
  })
}
export function del(data) {
  return request({
    url: '/customer/delete',
    method: 'post',
    data
  })
}
// 根据id获取实体数据
export function findById(id) {
  return request({
    url: '/customer/findById',
    method: 'get',
    params: { customerId: id }
  })
}
// 获取列表
export function findList(companyId) {
  return request({
    url: '/customer/findAllByCompanyId',
    method: 'get',
    params: { companyId: companyId }
  })
}
// 根据名字查询findByNameLike
export function findByNameLike(params) {
  return request({
    url: '/customer/findByNameLike',
    method: 'get',
    params
  })
}
